package com.xxkj.drugtraceability.ui.patientlist

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.xxkj.drugtraceability.R
import com.xxkj.drugtraceability.bean.DepartBean
import com.xxkj.drugtraceability.databinding.DepartItemBinding
import com.xxkj.drugtraceability.databinding.LayoutDrugScanBinding
import com.xxkj.drugtraceability.databinding.PatientItemBinding
import com.xxkj.drugtraceability.ext.clickN

/**
 * author: zhoujingjin
 * created on: 2024/9/11 10:27
 * description:
 */
class DepartAdapter(private val action:(item: DepartBean)->Unit):
    BaseQuickAdapter<DepartBean, BaseDataBindingHolder<DepartItemBinding>>(R.layout.depart_item) {
    override fun convert(holder: BaseDataBindingHolder<DepartItemBinding>, item: DepartBean) {
        holder.dataBinding?.apply {
            data = item
            ll.clickN {
                action.invoke(item)
            }
        }
    }
}